/*
 * @Author: NtyAaron
 * @Date: 2021-04-09 16:09:05
 * @LastEditors: NtyAaron
 * @LastEditTime: 2021-06-23 14:23:57
 * @Description: 公共服务界面api
 * @FilePath: \dwq\api\pubService\pubService.js
 */
import request from '../../utils/request'

// 当前城市
export const getCity = () => {
  return request({
    url: ' /pubic/getCity',
  })
}

// 城市天气
export const getCityWeather = (e) => {
  return request({
    url: `/pubic/getCityWeather?city=${e}`,
  })
}

// 搜索医院
export const getHospital = (data) => {
  return request({
    url: `/pubic/getHospital`,
    data,
  })
}

// 当前定位
export const getLocation = (e) => {
  return request({
    url: '/pubic/getLocation',
  })
}

// 地点搜索
export const getPlace = (data) => {
  return request({
    url: '/pubic/getPlace',
    data,
  })
}

// 搜索警察局
export const getPolice = (data) => {
  return request({
    url: `/pubic/getPolice`,
    data,
  })
}

// 收藏
export const saveCollect = (data) => {
  return request({
    method: 'POST',
    url: `/collect/saveCollect`,
    data,
  })
}

// 根据坐标获取当前位置
export const getLocationByCoordinate = (data) => {
  return request({
    url: `/pubic/getLocationByCoordinate`,
    data,
  })
}

// 获取医院详情
export const getHospitalDetails = (data) => {
  return request({
    url: `/pubic/getHospitalDetails`,
    data,
  })
}
//搜索警察局---高德
export const searchPolice = (data) => {
  return request({
    url: `/pubic/searchPolice`,
    data,
  })
}

//搜索警察局---高德
export const searchHospital = (data) => {
  return request({
    url: `/pubic/searchHospital`,
    data,
  })
}

//搜索警察局---高德分页
export const searchPolicePage = (data) => {
  return request({
    url: `/pubic/searchPolicePage`,
    data,
  })
}

//搜索警察局---高德分页
export const searchHospitalPage = (data) => {
  return request({
    url: `/pubic/searchHospitalPage`,
    data,
  })
}
